
	      **This file creates a county map of sanctuary cities**	

			**	**	**	**	**	**	**	**	**	**	**	**	**
			**	**	**	**	**	**	**	**	**	**	**	**	**
			**	**	**	**	**	**	**	**	**	**	**	**	**

			
			
			
			
			
			
			
*** Make a simple map using the US county date

* Open data file
use US_County_LowRes_2013data_Stata11, clear

* Limit extent of map to continential US
keep if continental == 1 & territories == 0
				
*fix names
rename countyname county
replace county = lower(county)

*remove duplicates
drop if county == "baltimore"


*fix names
replace county = "alexandria city" if county == "alexandria"
replace county = "virginia beach city" if county == "virginia beach"
replace county = "dona ana" if county == "doña ana" 
replace county = "anchorage municipality" if county == "anchorage"

*make state lower case
gen state = lower(statename)



*merge in sanctuary policy data


merge 1:1 state county using policies
*all counties in dataset match except those in hawaii/Alaska
drop if _m == 2 


**Identify counties with sanctuary policies before end of 2015
gen sanctuary = policymonth < m(2016m1)
replace sanctuary = 2 if policymonth == . & _m!=3



* Sanctuary map
spmap sanctuary using "US_County_LowRes_2013coord_Stata11.dta", id(_ID) clmethod(unique) ///
fcolor(gs12 gs6 gs16) legend(order(2 "Nonsanctuary" 3 "Sanctuary" 1 "Not in Sample"))	
graph export "S2.png", replace	









